package com.itheima.homework2;

import java.util.HashMap;
import java.util.Set;

public class ChangeInfo {
    public static void main(String[] args) {
        HashMap<String,String> hm = new HashMap<>();
        hm.put("姓名","张三");
        hm.put("年龄","20");
        hm.put("性别","男");
        hm.put("地址","北京海淀区");
        hm.put("专业","java");
        Set<String> keySet = hm.keySet();
        for (String key : keySet) {
            String value = hm.get(key);
            if(key.equals("地址")){
                value = "北京顺义区";
                System.out.println(key+"="+value);
            }else {
                System.out.println(key+"="+value);
            }
        }
    }
}
